import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        int i = 44;
        Students result = new Students();
        while(i>0)
        {
            Scanner scan = new Scanner(System.in);
            System.out.println("请输入你自身的编号:");
            int m = scan.nextInt();
            System.out.println("请输入你要投的号码:");
            int n = scan.nextInt();
            result.vote(n, m);
            i--;
        }
        result.print();
    }
}

class Students{
    public boolean[] students = new boolean[44];
    public int[] ret = new int[44];
    public void vote(int i, int j)
    {
        if(this.students[j-1] == false)
        {
            this.ret[i-1] += 1;
            System.out.println("感谢你的投票");
            this.students[j-1] = true;
        }
        else
        {
            System.out.println("请勿重复投票");
        }
    }
    public void print()
    {
        int i = 44;
        System.out.println("从学号1到44票数结果:");
        while(i>0)
        {
            System.out.print(ret[i-1]);
            i--;
        }
    }
}
